hsb

Iterating over colors

Is there a good way to iterate over colors? I know it sounds like a strange question but here's an analogy. Suppose you write a game where you travel around the Earth. You pick a starting point and then you define a rule that you apply repeatedly. For example: Start at your current location on Earth and then define the great circle ...

Objective-C RGB to HSB

Let's say I've got the colour FF0000, which is red. Finding a darker colour is easy, I just type maybe CC instead of the FF, but let's say I've got the colour AE83FC, which is a complicated colour, how the heck would I find a lighter or darker version of it automatically? I figured the easy way to do this is to convert my RGB to HSB [Hu...

Convert HSB color to HSL

Ho do I convert HSB color to HSL? Photoshop shows HSB color in its color picker. HSL color can be used in CSS. I tried this JS: function hsb2hsl(h, s, b) { return { h: h, s: s, l: b-s/2 } } But hsb2hsl(0, 100, 50).l == 0 instead of 25 Update: Can I do that without converting HSB → RGB → HSL? ...

Color Theory: How to convert Munsell HVC to RGB/HSB/HSL

I'm looking at at document that describes the standard colors used in dentistry to describe the color of a tooth. They quote hue, value, chroma values, indicating they are from the 1905 Munsell description of color: The system of colour notation developed by A. H. Munsell in 1905 identifies colour in terms of three attributes: ...