BrushCue Example: Color Rectangle¶
You can use this tool online at https://www.brushcue.com/tools/color-rectangle
In [ ]:
!pip install brushcue
In [1]:
import brushcue
from PIL import Image
import io
rgba_color_constant_1 = brushcue.r_g_b_a_color_constant(0.26, 0.56, 0.3, 1)
color_profile_srgb_2 = brushcue.color_profile_s_r_g_b()
vector_2_int_from_components_3 = brushcue.vector2i_from_components(550, 821)
color_rect_4 = brushcue.composition_color_rect(rgba_color_constant_1, color_profile_srgb_2, vector_2_int_from_components_3)
ctx = brushcue.Context()
result = color_rect_4.execute(ctx)
composition = result.as_composition()
data_bytes = composition.to_image_bytes(ctx)
img = Image.open(io.BytesIO(data_bytes))
img.thumbnail((400, 400)) # remove this line for full resolution
img
Out[1]: