Skip to main content

Import

import { Color } from '@adoptaunabuelo/react-components';

Usage

// Background colors
const primaryBg = Color.background.primary;
const softBg = Color.background.soft;

// Text colors
const primaryText = Color.text.primary;
const highText = Color.text.high;

// Line/border colors
const primaryLine = Color.line.primary;
const softLine = Color.line.soft;

// Status colors
const hoverState = Color.status.primary.hover;
const successColor = Color.status.color.success;

Color Categories

Background

PropertyValueDescription
primary#008FF5Primary blue
primaryLow#ECF4FBLight primary blue
secondary#FFAA47Secondary orange
secondaryLow#FFF6E5Light secondary orange
deepBlue#00315CDark blue
deepBlueLow#F0F3F6Light deep blue
orange#FF773DAccent orange
redLow#FFE5E5Light red
deepGreen#1A5B3CDark green
greenLow#E4F8EELight green
aquamarine#00ABC5Aquamarine blue
aquamarineLow#EAF8FALight aquamarine
full#333333Dark gray
high#4F4F4FMedium dark gray
mediumHigh#828282Medium gray
mediumLow#BDBDBDLight medium gray
low#E0E0E0Light gray
soft#F2F2F2Very light gray
neutral#FFFFFFWhite

Line (Borders)

PropertyValueDescription
primary#008FF5Primary blue
primarySoft#C4DEF5Light primary blue
secondary#FFAA47Secondary orange
secondarySoft#FFD5A3Light secondary orange
green#08A85BGreen
greenSoft#B2EBD0Light green
redSoft#F5CFCFLight red
deepBlue#00315CDark blue
deepBlueSoft#C0CFDCLight deep blue
full#333333Dark gray
low#CCCCCCLight gray
soft#E0E0E0Very light gray
softTransparent#0000000ATransparent black (4% opacity)
white#FFFFFFWhite
whiteTransparent#FFFFFF80Transparent white (50% opacity)

Text

PropertyValueDescription
primary#008FF5Primary blue
primarySoft#93CCF5Light primary blue
deepBlue#00315CDark blue
aquamarine#00ABC5Aquamarine blue
orange#FF773DOrange
red#E02D2DError red
green#08A85BSuccess green
deepGreen#1C5C3DDark green
primaryBlack#001D3DVery dark blue
secondaryBlack#701E09Very dark brown
full#000000C7Black (78% opacity)
high#0000007DBlack (49% opacity)
medium#00000040Black (25% opacity)
low#0000001FBlack (12% opacity)
white#FFFFFFWhite
whiteHigh#FFFFFFA6White (65% opacity)
whiteMedium#FFFFFF66White (40% opacity)
whiteLow#FFFFFF47White (28% opacity)

Status

Primary States

PropertyValueUsage
default#008FF5Primary default
hover#005AA8Primary hover
active#00315CPrimary active
pressed#00315CPrimary pressed
softDefault#EBF3FASoft default
softHover#D3E5F5Soft hover
softActive#008FF5Soft active
softPressed#008FF5Soft pressed

Secondary States

PropertyValueUsage
default#FFAA47Secondary default
hover#EB9026Secondary hover
pressed#C76B00Secondary pressed
active#C76B00Secondary active

Neutral States

PropertyValueUsage
default#FFFFFFNeutral default
hover#0000000DNeutral hover
pressed#0000001FNeutral pressed
active#0000001FNeutral active

Semantic Colors

PropertyValueUsage
success#08A85BSuccess state
successDefault#E4F8EESuccess background
error#E02D2DError state
errorDefault#FFE5E5Error background
warning#FFAA47Warning state
warningDefault#FFF1D6Warning background

Examples

Button Styling

import { Color } from '@adoptaunabuelo/react-components';

const StyledButton = styled.button`
  background-color: ${Color.background.primary};
  color: ${Color.text.white};
  border: 1px solid ${Color.line.primary};
  
  &:hover {
    background-color: ${Color.status.primary.hover};
  }
  
  &:active {
    background-color: ${Color.status.primary.pressed};
  }
`;

Card Component

import { Color } from '@adoptaunabuelo/react-components';

const Card = styled.div`
  background-color: ${Color.background.neutral};
  border: 1px solid ${Color.line.soft};
  padding: 16px;
  border-radius: 8px;
`;

const Title = styled.h3`
  color: ${Color.text.full};
  margin-bottom: 8px;
`;

const Description = styled.p`
  color: ${Color.text.high};
`;

Alert Messages

import { Color } from '@adoptaunabuelo/react-components';

const SuccessAlert = styled.div`
  background-color: ${Color.status.color.successDefault};
  color: ${Color.text.green};
  border-left: 4px solid ${Color.status.color.success};
  padding: 12px;
`;

const ErrorAlert = styled.div`
  background-color: ${Color.status.color.errorDefault};
  color: ${Color.text.red};
  border-left: 4px solid ${Color.status.color.error};
  padding: 12px;
`;

Migration Note

This is the legacy color system. For new projects, consider using ColorV2 which provides an updated color palette with better semantic naming.

Build docs developers (and LLMs) love