1.7.0 • Published 2 years ago

@brandcolors/google v1.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Brand Colors Google

Version Download License

Introduction

Google Brand Colors.

Installation

npm install @brandcolors/google

Usage

Styles

@use "@brandcolors/google/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/google";

.foo {
    color: google.$primary;
    // color: #4285f4;
    color: google.$primary-rgb;
    // color: rgb(66, 133, 244);
}

Custom Properties

@use "@brandcolors/google";

:root {
    @include google.custom-properties(primary);
    // --bc-google-primary: #4285f4;
    @include google.custom-properties(primary-rgb);
    // --bc-google-primary-rgb: rgb(66, 133, 244);
}

API

Variables

VariableValue
$primaryReturn hex value color.
$primary-rgbReturn rgb color.
$blueReturn hex value color.
$greenReturn hex value color.
$yellowReturn hex value color.
$redReturn hex value color.

Mixins

MixinDescription
custom-properties($values...)Create dedicated custom property. If the $values is empty, the mixin will create all styles by default.