Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@radix-ui/colors

Package Overview
Dependencies
Maintainers
6
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/colors

[![Radix Colors Logo](colors.png)](https://radix-ui.com/colors)

  • 3.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
6
Created

What is @radix-ui/colors?

@radix-ui/colors is a collection of color palettes designed for use in user interfaces. It provides a set of carefully crafted color scales that can be used to create visually appealing and accessible designs.

What are @radix-ui/colors's main functionalities?

Color Scales

Provides a set of color scales for different colors like blue, red, and green. Each color scale has multiple shades that can be used for different UI elements.

import { blue, red, green } from '@radix-ui/colors';

const primaryColor = blue.blue9;
const errorColor = red.red9;
const successColor = green.green9;

console.log(primaryColor); // Outputs: #3b82f6
console.log(errorColor); // Outputs: #ef4444
console.log(successColor); // Outputs: #10b981

Dark Mode Support

Provides dark mode variants for each color scale, allowing for seamless integration with dark mode themes.

import { blueDark, redDark, greenDark } from '@radix-ui/colors';

const primaryColorDark = blueDark.blue9;
const errorColorDark = redDark.red9;
const successColorDark = greenDark.green9;

console.log(primaryColorDark); // Outputs: #1e40af
console.log(errorColorDark); // Outputs: #b91c1c
console.log(successColorDark); // Outputs: #047857

Accessibility

Includes color shades that are optimized for accessibility, ensuring that text and UI elements are readable for users with visual impairments.

import { blue, red, green } from '@radix-ui/colors';

const accessiblePrimary = blue.blue11;
const accessibleError = red.red11;
const accessibleSuccess = green.green11;

console.log(accessiblePrimary); // Outputs: #1e3a8a
console.log(accessibleError); // Outputs: #991b1b
console.log(accessibleSuccess); // Outputs: #065f46

Other packages similar to @radix-ui/colors

Keywords

FAQs

Package last updated on 02 Oct 2023

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