I have a colour scheme based around yellow, for warning messages on a website. It amounts to a slightly orange bordered box, with a pale yellow fill. The exact colours are:
FED626 (border)
FFF7C0开发者_运维技巧 (fill)
I want to know if it's possible to convert this scheme mathematically or algorithmically somehow, to come up with a blue version where the border is the "same amount" of blue as this one is yellow. Is this possible, or do I just "pin the tail on the donkey" on a colour pallet to get roughly the right one?
I ask, because I'd quite like to be able to calculate this on the fly, to perhaps implement something in .less.
To give you an idea, I tried swopping the red and blue values on those two, and came up with this:
26D6FE (border)
C0F7FF (fill)
That wasn't too hard, but think about if I wanted a pink colour scheme... :)
Actually, I just read part of the the HSL and HSV page on Wikipedia, and realise that all I need to do is pick a colour, then change the Hue value to rotate to a colour I want.
Easy, now I'm a graphics expert!
精彩评论