Completed color picker, value editor, desktop layout.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import type { RefObject } from "react";
|
||||
|
||||
import { Hex } from "colorlib";
|
||||
|
||||
import type { CartesianSpace, Range } from "./types";
|
||||
import { Direction } from "./types";
|
||||
|
||||
@@ -94,3 +96,7 @@ export function roundTo(value: number, decimals: number = 0) {
|
||||
const factor = Math.pow(10, decimals);
|
||||
return Math.round(value * factor) / factor;
|
||||
}
|
||||
|
||||
export function formatCssRgb(hex: Hex) {
|
||||
return `rgb(${hex.r},${hex.g},${hex.b})`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user