color-bridge

A tool to generate region-specific color palettes, based on cultural contexts.
Documentation website
npm i color-bridge
import colorBridge from "color-bridge";
const { bridge, utils } = colorBridge();
const { palette, hue, themes } = bridge({ culture: "chinese" });
Available cultures:
const { bridge } = colorBridge();
const { palette, hues, themes } = bridge({ culture: "african" });
const { bridge } = colorBridge();
const { palette, hues, themes } = bridge({ culture: "chinese" });
const { bridge } = colorBridge();
const { palette, hues, themes } = bridge({ culture: "indian" });
const { bridge } = colorBridge();
const { palette, hues, themes } = bridge({ culture: "japanese" });
const { bridge } = colorBridge();
const { palette, hues, themes } = bridge({ culture: "latinAmerican" });
const { bridge } = colorBridge();
const { palette, hues, themes } = bridge({ culture: "middleEastern" });
const { bridge } = colorBridge();
const { palette, hues, themes } = bridge({ culture: "southeastAsian" });
const { bridge } = colorBridge();
const { palette, hues, themes } = bridge({ culture: "western" });
Utility functions
const { utils } = colorBridge();
const {
createHues,
createShiftedHues,
darkenHexColor,
lightenHexColor,
shiftHue,
textColorForBackground,
} = utils();
const myHues = createHues({ hexColor: "#6376DD" });
const myShiftedHues = createShiftedHues({
hexColor: "#6376DD",
step: 0.018,
range: 0.3,
});
const darkened = darkenHexColor({ hexColor: "#6376DD", force: 0.2 });
const darkened = lightenColor({ hexColor: "#6376DD", force: 0.2 });
const shifted = shiftHue({ hexColor: "#6376DD", force: 0.2 });
const textColor1 = textColorForBackground("#6376DD");
const textColor2 = textColorForBackground("#887123");
const textColor3 = textColorForBackground("#6376DD", {
light: "#FAFAFA",
dark: "#1A1A1A",
});
const textColor4 = textColorForBackground("#887123", {
light: "#FAFAFA",
dark: "#1A1A1A",
});