New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fylgja/colors

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fylgja/colors

Add a collection of prebuild colors to any project with ease, using Fylgja Colors

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Fylgja - Colors

NPM version license

Add a collection of prebuild colors to any project with ease, using Fylgja Colors.

Installation

npm install @fylgja/colors

Then include the component in to your code via;

@use "@fylgja/colors";
// Or via PostCSS and other options as plain CSS
@import "@fylgja/colors"; // *

How to use

This component comes in 3 syntaxes.

  • SCSS is offered in both the SCSS and CSS variable syntax
  • CSS is offered as CSS variables
  • Javascript Style Tokens, if you want to use it in a Javascript based environment, like React or Vue.

And comes packing in both HEX and HSL syntax;

Color options

Info: For a full list of available colors see https://fylgja.dev/components/colors/

SCSS version

@use "@fylgja/colors" as *;

.style {
    color: $blue-500;
}

// CSS Syntax
@use "@fylgja/colors/props";

.style {
    color: var(--blue-500);
}

CSS version

@import "@fylgja/colors";

.style {
    color: var(--blue-500);
}

Javascript

import props from "@fylgja/colors"

const style = {
    color: props.blue[500]
}

Using HSL syntax

Instead of importing the default version you can import the hsl version using;

@use "@fylgja/colors/props.hsl";
// Or via PostCSS and other options as plain CSS
@import "@fylgja/colors/colors.hsl"; // *

.silver-card {
    background-color: hsl(var(--blue-gray-400) / 10%);
}

Using a single colors

Instead of importing all the color options you can import 1 of the many colors, using the following import path;

@use "@fylgja/colors/hex/blue"; /* As HEX */
@use "@fylgja/colors/hsl/blue"; /* As HSL */

This only available for the CSS syntax

Keywords

FAQs

Package last updated on 24 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc