A simple system-wide color picker. The color picker can be triggered with a standalone command or as part of the menu bar command. The menu bar shows the last nine picked colors. The Organize Colors command can be used to see all colors.
This extensions follows Raycast Cross-Extension Conventions.
You can use crossLaunchCommand to use the picker color result.
copyToClipboardType: boolean
Default: false
Copy to clipboard is disabled by default. Set it to true to enable copy action.
callbackLaunchOptionsType: LaunchOptions
Default: undefined
Use this option to let this extension know what kind of callback needs to be performed when crossLaunchCommand.
hexType: string
It returns the color picker hex result.
formattedColorType: string
It returns the formatted color result. The format can be changed in the preferences of the extension.
import { LaunchType } from "@raycast/api";
import { crossLaunchCommand } from "raycast-cross-extension";
await crossLaunchCommand({
name: "pick-color",
type: LaunchType.UserInitiated,
extensionName: "color-picker",
ownerOrAuthorName: "thomas",
});
import { LaunchType } from "@raycast/api";
import { crossLaunchCommand } from "raycast-cross-extension";
await crossLaunchCommand({
name: "color-wheel",
type: LaunchType.UserInitiated,
extensionName: "color-picker",
ownerOrAuthorName: "thomas",
});
import { LaunchProps } from "@raycast/api";
type LaunchContext = {
hex?: string;
};
export default function Command({ launchContext = {} }: LaunchProps<{ launchContext?: LaunchContext }>) {
useEffect(() => {
if (launchContext.hex) {
console.log(launchContext.hex);
}
}, []);
}
Whether you're tweaking CSS, fine-tuning gradients, or selecting the perfect hue for your next design project, Color Picker is your go-to tool. From HEX to RGB, HSL to CMYK, we've got all your color values covered.
Launching the Color Picker is easy. Simply hit your Raycast hotkey (default is ⌘+Space) and type "color picker" or "pick color". The extension will spring to life, ready to capture any hue on your screen. If you're looking to integrate it with your extension you can trigger the color picker programmatically using the crossLaunchCommand function.
Raycast's Color Picker doesn't rely on complex commands - it's all about simplicity and speed. The primary commands are:
pick-color: This launches the main color picker interface.color-wheel: Opens the interactive color wheel for precise hue selection.organize-colors: Allows you to manage and categorize your color palettes.Pro tip: These commands can be customized or aliased in your Raycast preferences for even quicker access.
Raycast's Color Picker tool is a powerhouse of functionality. Here's a breakdown of its core operations: