Introduction
WhatsApp Brand Colors.
Installation
npm install @brandcolors/whatsapp
Usage
Styles
@use "@brandcolors/whatsapp/styles";
The styles will create all custom properties in CSS root
. If you want this custom properties anywhere else, use the
public mixin custom-properties
.
Theming
@use "@brandcolors/whatsapp";
.foo {
color: whatsapp.$primary;
// color: #1da1f2;
color: whatsapp.$primary-rgb;
// color: rgb(29, 161, 242);
}
Custom Properties
@use "@brandcolors/whatsapp";
:root {
@include whatsapp.custom-properties(primary);
// --bc-whatsapp-primary: #1da1f2;
@include whatsapp.custom-properties(primary-rgb);
// --bc-whatsapp-primary-rgb: rgb(29, 161, 242);
}
API
Variables
Variable | Value |
---|---|
$primary |
Return hex value color. |
$primary-rgb |
Return rgb color. |
Mixins
Mixin | Description |
---|---|
custom-properties($values...) |
Create dedicated custom property. If the $values is empty, the mixin will create all styles by default. |