UNPKG

911 BTypeScriptView Raw
1import { ValidationOptions } from '../ValidationOptions';
2export declare const IS_RGB_COLOR = "isRgbColor";
3/**
4 * Check if the string is a rgb or rgba color.
5 * `includePercentValues` defaults to true. If you don't want to allow to set rgb or rgba values with percents, like rgb(5%,5%,5%), or rgba(90%,90%,90%,.3), then set it to false.
6 * If given value is not a string, then it returns false.
7 */
8export declare function isRgbColor(value: unknown, includePercentValues?: boolean): boolean;
9/**
10 * Check if the string is a rgb or rgba color.
11 * `includePercentValues` defaults to true. If you don't want to allow to set rgb or rgba values with percents, like rgb(5%,5%,5%), or rgba(90%,90%,90%,.3), then set it to false.
12 * If given value is not a string, then it returns false.
13 */
14export declare function IsRgbColor(includePercentValues?: boolean, validationOptions?: ValidationOptions): PropertyDecorator;