How can I start creating a color rainbow pattern?

I am bored, and I would like to create my own picket of flowers.

First, I would like to create a color swatch. How to create a color swatch?

This is a two-part question.

  • How to draw a single pixel point based on the ARGB value.

  • What values ​​exist in these ARGB values? What are my ranges?

Will looping and drawing these points be effective? My intention is to create this image in memory, and then apply it to the Drawing.Image class, and then set it to the image box.

Thanks for the suggestions.

+3
source share
2 answers

, , . - , .

ARGB, SetPixel Bitmap . , Bitmap - . , , , , , , .

SetPixel - . , , , / , . , . Graphics GDI + LinearGradientBrush ,
.

, , , - , . , , , , - RGB HSV ( HSB, HSL - ).

RGB , . 0 () 255 (). (255, 255, 255), - (0, 0, 0). , . , , , , , , RGB.

, HSV , , /. , ( ) Photoshop color picker, , , :

    Adobe Photoshop Color Picker

HSV : , ( ).

  • , 0 360.

          The Color Circle, indicating degrees of hue

0 100 ( ).

  • . (100), ( 0).

          Saturation

  • ( ) . 100, , , 0 ().

          Value

, , , :

+7

, , , , . - X Y MouseEventArgs. /.

RGB 0-255, A - 0-100

0
source

Source: https://habr.com/ru/post/1793501/


All Articles