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.
copyToClipboard
Type: boolean
Default: false
Copy to clipboard is disabled by default. Set it to true
to enable copy action.
callbackLaunchOptions
Type: LaunchOptions
Default: undefined
Use this option to let this extension know what kind of callback needs to be performed when crossLaunchCommand
.
hex
Type: string
It returns the color picker hex result.
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);
}
}, []);
}