Judging from the RGB of <Python> color as one of the red, orange, yellow, blue, navy, and white swords

Asked 2 years ago, Updated 2 years ago, 105 views

Hello, I'm a college student who just came across Python. I want to create a program that converts visual data into auditory data After loading the image, extract the RGB of the color of the mouse point Based on that RGB color,

(0, 0, 0) Test (255, 0, 0) Red (0, 255, 0) Green (0, 0, 255) Blue (255, 255, 0) Yellow (0, 255, 255) Xi'an (255, 0, 255) Magenta (255, 255, 255) White

I'd like to distinguish it as one of them. After determining the color, I am thinking of playing a specific sound corresponding to each color. (ex. Determine burgundy-like color as red and play the corresponding help)

What should I do? I'm trying, but I don't know how to do it. I ask for a lot of help from programmers.

rgb python

2022-09-20 14:45

1 Answers

Convert RGB to HSV or HSL and then convert the hue and saturation range of the color values to a proper hertz to produce the sound. Burgundy, for example, is a dark/dark red, so it's not coming, but C3.

As such, the beginning is to find out the substance of what I want to make and study the substance of what I want to make, such as what is a scale in the first place, what is RGB, what is RGB only, or how is color possible in the first place. Unanalyzed goals are bound to be vague, and there is no reason to be vague about defining and investigating information.

Let's get started.

PS. Conversely, it is possible to draw colors when you receive the sound of


2022-09-20 14:45

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.