+ 3

How to know the value needed to be kept in CSS for a particular colour?

12th Jun 2017, 6:44 PM
Narayana Naru
Narayana Naru - avatar
6 Respostas
+ 7
You make hexadecimal colors as a painter mix color, but with complementary colors to primary colors: A painter use subtractive colors system with cyan, magenta, yellow ( and black ), screen use additive with red, green and blue. On screen, no color is black, while on paper no color is white. http://www.worqx.com/color/color_systems.htm An hexaecimal color is composed by three digits ( from 0 to 9 and a to f -- 10 to 15 decimal ) pair ( each count from 00 to ff -- 0 to 255 decimal ). Full ( ff ) red and full green make yellow, full green and full blue make cyan, full red and full blue make magenta, full red, green and blue make white. You mix different levels of red, green and blue to compose a color... If you're more comfortable with decimal, you can use css rgb() notation. If you need transparency level, you can add an 'alpha channel' to define opacity of your color by appending one more hexadecimal pair, or use rgba() notation ( then, opacity is the 4th parameter, and unlike colors levels expected are integer from 0 to 255, opacity is expected to be float from 0 to 1 ). Standard tends to have rgb() notation implemented as rgba ( meaning support a 4th opacity parameter ). Anyway, you could prefer HSL ( Hue Saturation Luminosity ) collor system also provided by css by using hsl() or hsla() ( same as rgb/rgba for standard implementation, first parameter is bounded from 0 to 359 -- but is circular, meaning than 360 is equivalent to 0 -- and second and third are from 0 to 100 ).
13th Jun 2017, 6:48 AM
visph
visph - avatar
13th Jun 2017, 5:36 PM
Jafca
Jafca - avatar
+ 16
@Visph Don't you just love it when that happens?😒 At least they didn't mark their own answer as best...
13th Jun 2017, 5:32 PM
Jafca
Jafca - avatar
+ 5
Why do you mark my answer as best and immediatly next unmark it?
13th Jun 2017, 5:16 PM
visph
visph - avatar
+ 2
@visph I am actually new to this app. I didn't know what that was!
13th Jun 2017, 5:35 PM
Narayana Naru
Narayana Naru - avatar
+ 1
@jafca thank you!
13th Jun 2017, 5:37 PM
Narayana Naru
Narayana Naru - avatar