Skip to content

Instantly share code, notes, and snippets.

@AlvisonHunterArnuero
Last active October 24, 2024 16:14

Revisions

  1. AlvisonHunterArnuero revised this gist Oct 24, 2024. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions ThemeTextColors.ts
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    const themeTextColorPalette = {
    primary: "#3b5998",
    secondary: "#8b9dc3",
    primary: "#3B5998",
    secondary: "#8B9DC3",
    dark: "#333333",
    light: "#f7f7f7",
    light: "#F7F7F7",
    muted: "#CCC222",
    } as const;

    @@ -15,4 +15,4 @@ const getHexColorCode = (colorName: ThemeTextColorName): string => {
    const newColor: ThemeTextColorName = "dark";
    const hexColor = getHexColorCode(newColor);

    console.log(`Hex Color for ${newColor} is ${hexColor}`);
    console.log(`Hex Color for ${newColor} is ${hexColor}`);
  2. AlvisonHunterArnuero revised this gist Oct 24, 2024. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions ThemeTextColors.ts
    Original file line number Diff line number Diff line change
    @@ -3,16 +3,16 @@ const themeTextColorPalette = {
    secondary: "#8b9dc3",
    dark: "#333333",
    light: "#f7f7f7",
    muted: "#CCC222"
    };
    muted: "#CCC222",
    } as const;

    type ThemeTextColorName = keyof typeof themeTextColorPalette;

    const getHexColorCode = (color:ThemeTextColorName) => {
    return themeTextColorPalette[color]
    const getHexColorCode = (colorName: ThemeTextColorName): string => {
    return themeTextColorPalette[colorName];
    }

    const newColor: ThemeTextColorName = "dark"
    const newColor: ThemeTextColorName = "dark";
    const hexColor = getHexColorCode(newColor);

    console.log(`Hex Color for ${newColor} is ${hexColor}`);
    console.log(`Hex Color for ${newColor} is ${hexColor}`);
  3. AlvisonHunterArnuero revised this gist Oct 21, 2024. No changes.
  4. AlvisonHunterArnuero created this gist Oct 21, 2024.
    18 changes: 18 additions & 0 deletions ThemeTextColors.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    const themeTextColorPalette = {
    primary: "#3b5998",
    secondary: "#8b9dc3",
    dark: "#333333",
    light: "#f7f7f7",
    muted: "#CCC222"
    };

    type ThemeTextColorName = keyof typeof themeTextColorPalette;

    const getHexColorCode = (color:ThemeTextColorName) => {
    return themeTextColorPalette[color]
    }

    const newColor: ThemeTextColorName = "dark"
    const hexColor = getHexColorCode(newColor);

    console.log(`Hex Color for ${newColor} is ${hexColor}`);