Comments (4)
The idea is that the opaque and alpha scales are interchangeable, since they match almost perfectly.
Sometimes you need a color to be transparent, so it works well on coloured backgrounds for example. Let's say you have a text field with a light gray border, we'll use Mauve for this example. You use step mauve7 here for the border. That border will work well on a white background in light mode, or a dark background in dark mode.
But the border won't look great on a purple background for example. So you can use mauveA7, which is transparent. Now your text field border will work well on any background because it blends in, but it still looks the same as mauve7 on white/dark backgrounds.
Sometimes you need opaque colors, sometimes transparent. Now you have the option.
from colors.
@colmtuite Can you please explain this in the docs (on the website)?
from colors.
It would be great also to provide and example showing a visual comparison with/without alpha color, to show in what cases it's relevant to use the alpha version.
from colors.
Thank you for that explanation. That makes a lot of sense to me and sounds very helpful.
from colors.
Related Issues (20)
- ✨ Feature Request: Add script for building scss/sass modules HOT 1
- Feature Request: Generate new palettes from a base color HOT 2
- Wrong Color Exported as SVG for mauveDarkA HOT 1
- How did you calculate the alpha colors? HOT 4
- Is there a preferred disabled color on the scale?
- How to use with `prefers-color-scheme`? HOT 3
- Introduce a darker shade in the color scales for dark mode HOT 1
- Not enough contrast on color 9 according to lighthouse HOT 1
- Option to copy values easily HOT 1
- Usage with tailwind opacity modifier HOT 1
- Cannot see the NavBar in light Mode HOT 1
- Release 3.0.0 HOT 4
- Common color keys
- Docs: copying HSL colours copies RGB colours instead HOT 1
- Add an index.css file including all colours alongside index.js
- How to specify color shade? HOT 1
- StyleX Support
- Inaccessible color combinations in light theme HOT 3
- Some color scales (Yellow, Amber, Orange) do not meet the specified 4.5:1 contrast ratio guideline
- FR: add dark colors outside `.dark` selector
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colors.