@ScalarFunction
    @SqlType(ColorType.NAME)
    public static long rgb(@SqlType(StandardTypes.BIGINT) long red, @SqlType(StandardTypes.BIGINT) long green, @SqlType(StandardTypes.BIGINT) long blue)
    {
        checkCondition(red >= 0 && red <= 255, INVALID_FUNCTION_ARGUMENT, "red must be between 0 and 255");
        checkCondition(green >= 0 && green <= 255, INVALID_FUNCTION_ARGUMENT, "green must be between 0 and 255");
        checkCondition(blue >= 0 && blue <= 255, INVALID_FUNCTION_ARGUMENT, "blue must be between 0 and 255");

        return (red << 16) | (green << 8) | blue;
    }
@Test
    public void testToRgb()
    {
        assertEquals(rgb(0xFF, 0, 0), 0xFF_00_00);
        assertEquals(rgb(0, 0xFF, 0), 0x00_FF_00);
        assertEquals(rgb(0, 0, 0xFF), 0x00_00_FF);
    }