
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
react-color-palette
Advanced tools
npm install react-color-palette
yarn add react-color-palette
import { ColorPicker, useColor } from "react-color-palette";
import "react-color-palette/lib/css/styles.css";
export const App = () => {
const [color, setColor] = useColor("hex", "#121212");
return <ColorPicker width={456} height={228} color={color} onChange={setColor} hideHSV dark />;
};
Library | Minified | Gzipped | Dependencies | Tree Shaking | Type Declarations |
---|---|---|---|---|---|
react-color-palette | |||||
react-colorful | |||||
react-input-color | |||||
rc-color-picker | |||||
react-color |
If the default colors don't fit your project, you can always change them.
.rcp-light {
--rcp-background: #ffffff;
--rcp-input-text: #111111;
--rcp-input-border: rgba(0, 0, 0, 0.1);
--rcp-input-label: #717171;
}
.rcp-dark {
--rcp-background: #181818;
--rcp-input-text: #f3f3f3;
--rcp-input-border: rgba(255, 255, 255, 0.1);
--rcp-input-label: #999999;
}
ColorPicker
PropsName | Type | Default | Description |
---|---|---|---|
width | number | The width of the color picker. | |
height | number | width | The height of the color picker. |
color | Color | The current Color . | |
onChange | Function | A function to update Color . | |
onChangeComplete | Function | undefined | A callback is called every time the user stops changing a color (mouseup event). |
hideHEX | bool | false | Hide HEX input. |
hideRGB | bool | false | Hide RGB input. |
hideHSV | bool | false | Hide HSV input. |
alpha | bool | false | Enable alpha channel. |
dark | bool | false | Color theme. |
useColor
ArgumentsName | Type | Default | Description |
---|---|---|---|
model | "hex" | "rgb" | "hsv" | The color model. | |
initColor | string | ColorRGB | ColorHSV | The initial color in the selected color model. |
toColor
ArgumentsName | Type | Default | Description |
---|---|---|---|
model | "hex" | "rgb" | "hsv" | The color model. | |
color | string | ColorRGB | ColorHSV | The color in the selected color model. |
Color
Field | Type |
---|---|
hex | string |
rgb | ColorRGB |
hsv | ColorHSV |
ColorRGB
Field | Type |
---|---|
r | number |
g | number |
b | number |
a | number | undefined |
ColorHSV
Field | Type |
---|---|
h | number |
s | number |
v | number |
a | number | undefined |
Code released under the MIT license.
FAQs
🎨 Lightweight Color Picker component for React.
The npm package react-color-palette receives a total of 75,671 weekly downloads. As such, react-color-palette popularity was classified as popular.
We found that react-color-palette demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.