All files / client/src theme.ts

100% Statements 9/9
100% Branches 0/0
100% Functions 0/0
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149                    360x 360x   360x               360x               360x               360x               360x               360x   360x                                                                                                                                                                                          
import { addOpacity } from "client/utils/addOpacity";
 
interface Palette {
  lighter: string;
  light: string;
  primary: string;
  dark: string;
  darker: string;
}
 
const white = "rgb(245,245,245)";
const black = "rgb(3,3,3)";
 
const green = {
  lighter: "rgb(127,199,130)",
  light: "rgb(85,180,88)",
  primary: "rgb(62,142,65)",
  dark: "rgb(44,99,45)",
  darker: "rgb(25,57,26)",
};
 
const red = {
  lighter: "rgb(255,92,105)",
  light: "rgb(255,51,68)",
  primary: "rgb(245,0,20)",
  dark: "rgb(184,0,15)",
  darker: "rgb(122,0,10)",
};
 
const blue = {
  lighter: "rgb(118,155,229)",
  light: "rgb(67,117,219)",
  primary: "rgb(36,87,188)",
  dark: "rgb(26,63,137)",
  darker: "rgb(16,39,86)",
};
 
const yellow = {
  lighter: "rgb(254,239,175)",
  light: "rgb(253,227,114)",
  primary: "rgb(252,216,54)",
  dark: "rgb(242,198,2)",
  darker: "rgb(182,149,2)",
};
 
const gray = {
  lighter: "rgb(184,184,184)",
  light: "rgb(153,153,153)",
  primary: "rgb(122,122,122)",
  dark: "rgb(82,82,82)",
  darker: "rgb(51,51,51)",
};
 
const mainColor: Palette = green;
 
export const theme = {
  // Colors
  backgroundBody: white,
  backgroundHighlight: white,
  backgroundHover: addOpacity(mainColor.primary, "0.3"),
  backgroundSelected: addOpacity(mainColor.primary, "0.6"),
  backgroundMain: white,
  backgroundTag: addOpacity(mainColor.primary, "0.3"),
  backgroundWarning: red.lighter,
  backgroundDisabled: gray.light,
 
  borderActive: mainColor.primary,
  borderDisabled: mainColor.lighter,
  borderInactive: gray.primary,
  borderWarning: red.primary,
  borderCardHighlight: mainColor.light,
  borderCardWarnHighlight: red.light,
  tabBorder: gray.light,
 
  buttonPrimaryBackground: mainColor.primary,
  buttonPrimaryHover: addOpacity(mainColor.dark, "0.85"),
  buttonPrimaryClicked: mainColor.dark,
  buttonPrimaryText: white,
  buttonSecondaryBackground: white,
  buttonSecondaryBorder: mainColor.primary,
  buttonSecondaryHover: addOpacity(mainColor.primary, "0.25"),
  buttonSecondaryClicked: addOpacity(mainColor.primary, "0.5"),
  buttonBackgroundDisabled: gray.light,
  buttonText: black,
 
  formAccent: mainColor.primary,
 
  // Text colors
  textError: red.primary,
  textLink: mainColor.dark,
  textActiveTab: mainColor.dark,
  textInactiveTab: gray.darker,
  textMain: black,
  textLighter: gray.darker,
  textTag: black,
  textSecondary: gray.primary,
 
  iconFavorite: mainColor.primary,
  iconDefault: mainColor.primary,
 
  inputBorderFocus: mainColor.primary,
  inputTextPlaceholder: gray.light,
 
  resultsFoldBackground: white,
  resultsFoldBorder: gray.primary,
  warningBackground: yellow.lighter,
  warningBorder: yellow.primary,
 
  infoColor: blue.light,
  infoColorBackground: addOpacity(blue.light, "0.23"),
  warningColor: yellow.primary,
  warningColorBackground: addOpacity(yellow.primary, "0.23"),
  warningColorIcon: yellow.darker,
  errorColor: red.light,
  errorColorBackground: addOpacity(red.light, "0.23"),
  errorColorIcon: red.dark,
 
  // Breakpoints
  breakpointPhone: "768px",
  breakpointDesktop: "1024px",
 
  // Font sizes
  fontSizeSmaller: "12px",
  fontSizeSmall: "14px",
  fontSizeNormal: "16px",
  fontSizeLarge: "20px",
  linkFontSize: "18px",
  mainHeaderFontSize: "24px",
 
  // Icon sizes
  iconSizeSmall: "16px",
  iconSizeNormal: "20px",
  iconSizeLarge: "24px",
  iconSizeExtra: "30px",
 
  // Program item popularity icon colors
  popularityLow: "rgb(64, 106, 188)",
  popularityMedium: green.primary,
  popularityHigh: "rgb(249, 137, 48)",
  popularityVeryHigh: "rgb(240, 1, 20)",
  popularityExtreme: "rgb(160, 6, 81)",
 
  // Shadows
  shadowLower: "0 3px 4px rgba(0, 0, 0, 0.12), 0 3px 4px rgba(0, 0, 0, 0.19)",
  shadowHigher: "0 8px 18px rgba(0, 0, 0, 0.15), 0 4px 4px rgba(0, 0, 0, 0.21)",
};
 
export type Theme = typeof theme;