Massive/colors.ts

28 lines
906 B
TypeScript
Raw Permalink Normal View History

import { DefaultTheme, MD3DarkTheme } from "react-native-paper";
export const LIGHT_COLORS = [
{ hex: MD3DarkTheme.colors.primary, name: "Purple" },
{ hex: "#B3E5FC", name: "Blue" },
{ hex: "#FA8072", name: "Salmon" },
{ hex: "#FFC0CB", name: "Pink" },
{ hex: "#E9DCC9", name: "Linen" },
2024-02-17 07:57:44 +00:00
{ hex: "#9ACD32", name: "Green" },
2023-11-14 21:43:47 +00:00
{ hex: "#FFD700", name: "Gold" },
2024-02-12 02:24:33 +00:00
{ hex: "#00CED1", name: "Turquoise" },
];
2022-09-25 04:32:49 +00:00
export const DARK_COLORS = [
{ hex: DefaultTheme.colors.primary, name: "Purple" },
{ hex: "#0051a9", name: "Blue" },
{ hex: "#000000", name: "Black" },
2023-11-21 06:24:47 +00:00
{ hex: "#863c3c", name: "Brandy" },
{ hex: "#1c6000", name: "Kermit" },
{ hex: "#990000", name: "Red" },
{ hex: "#660066", name: "Magenta" },
];
export function darkenRgba(rgba: string, amount: number) {
let [r, g, b, a] = rgba.match(/\d+/g).map(Number);
return `rgba(${r}, ${g}, ${b}, ${Math.max(0, a - amount)})`;
}