Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-colorblender
Advanced tools
Readme
A powerful color picker in react.
npm install react-colorblender
import { ColorPicker } from 'react-colorblender';
import React from 'react';
import { ColorPicker, useColor } from 'react-colorblender';
import 'react-colorblender/dist/style.css';
export default function Home() {
const [color, setColor] = useColor('#ff0000');
return <ColorPicker color={color} onChange={setColor} />;
}
<ColorPicker color={color} onChange={setColor} />
Property | Required | Description | Type | Default |
---|---|---|---|---|
color | true | The color value | Color | - |
onChange | true | The color change event | (color: Color) => void | - |
width | false | The width of the picker | number | 250 |
className | false | The class name of the picker | string | - |
hideAlpha | false | Hide the alpha slider | boolean | false |
const [color, setColor] = useColor('#ff0000');
Args | Description | Type |
---|---|---|
initialColor | The initial color | Color |
interface ColorPickerProps {
width?: number;
hideAlpha?: boolean;
hideInput?: boolean;
color: Color;
onChange: (color: Color) => void;
className?: string;
}
import type { HexColor, HsvaColor, RgbaColor } from 'colorblender';
type ColorType = HexColor | RgbaColor | HsvaColor;
class Color {
hex: HexColor;
rgb: RgbaColor;
rgbString: string;
hsv: HsvaColor;
hsvString: string;
constructor(color: ColorType, model: Models);
}
type HexColor = string;
interface RgbaColor {
r: number;
g: number;
b: number;
a: number;
}
interface HsvaColor {
h: number;
s: number;
v: number;
a: number;
}
Please file an issue for bugs, missing documentation, or unexpected behavior.
MIT
FAQs
React color picker with colorblender
The npm package react-colorblender receives a total of 0 weekly downloads. As such, react-colorblender popularity was classified as not popular.
We found that react-colorblender 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.