Post a percentage of a colour
- Started
- Last post
- 7 Responses
- leewilson78
So you start with your base colour, then you use percentage opacity variations of that colour.
Then it comes to web building and the developer wants the hex, just wondered, assuming the colour below is right, just need percentage variations of that colour.
Example:
Base colour: #ff6600
90% of base colour
80% of base colouretc?
- BK0
6
- DRIFTMONKEY0
37
- leewilson781
maybe QBN wasn't the place.
For anyone else who thinks it might have been, SASS or LESS will be good:
So use variables, set your base colour, then use fade to show a percentage of that:
@brand-one: #002B7F;
background: fade(@brand-one, 20%);
- monoboy1
If you don't give the dev hex colours they might just use opacity values instead. If you make their lives easier they'll thank you for it.
- Just thought less might be a bit more efficient.leewilson78
- Al_dizzle0
/\ seriously, some devs I know would cramp up if they had to do this.
Why not just bring the opacity down, colour sample it, and generate the new hex?
- Maaku0
rgba() ?
- monoboy0
Most I know like things nailed down before work begins.
I tend to do an 'all styles' guide first. It saves on any disagreements or mistakes down the line.
Things like sRGB jpg exports and colour profiles can catch people out.
If the dev wants to find a better way, great.