How can I programmatically ascertain the html color hex codes for colors in a single spectral line? I'm definitely using the wrong terminology I'm just not sure how else to phrase it. This picture should bring clarity:
Notice how the cursor in the top rectangle is always in the same position. It's simply the cursor in the first bar that moves into different color segments, thus generating the hex codes visible below.
Is it possible to generate these programmatically?
it would take 3 steps to get there programatically: choose the base color (for each of your screen shots its the right top corner) then lighten it to the the right amount (the X axis of your squares) then darken it to the right amount (the Y axis of your squares) if your'e using precompiled css like SASS it would look like that:
$someColor: red;
$lighten: brighten($someColor,20%);
$darkenedColor : darken($lighten, 32%);
$darkenedColor will get you the point that you are looking for, it will work for any given $someColor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With