Visit ComfyUI Online for ready-to-use ComfyUI environment
Configure canvas settings for AI-generated artwork: dimensions, background, text alignment, padding, line spacing.
The Canvas Properties node is designed to help you configure and customize the canvas settings for your AI-generated artwork. This node allows you to define various properties such as the dimensions, background color, text alignment, padding, and line spacing of the canvas. By providing these settings, you can ensure that your canvas is tailored to your specific artistic needs, resulting in a more polished and professional final output. The node is particularly useful for setting up the initial canvas environment before adding other graphical elements, ensuring consistency and control over the visual aspects of your project.
The height
parameter specifies the height of the canvas in pixels. It determines the vertical size of the canvas, allowing you to control how much vertical space your artwork will occupy. The default value is 512 pixels, and you can adjust it in increments of 1 pixel to suit your needs.
The width
parameter defines the width of the canvas in pixels. This parameter controls the horizontal size of the canvas, giving you the flexibility to set the desired width for your artwork. The default value is 512 pixels, and it can be adjusted in increments of 1 pixel.
The background_color
parameter sets the background color of the canvas. You can specify the color using a string, such as "black" or any other valid color name or code. This parameter helps you establish the base color of your canvas, which can significantly impact the overall look and feel of your artwork. The default value is "black".
The text_alignment
parameter allows you to choose the alignment of text elements on the canvas. It offers several options, including "left top", "left center", "left bottom", "center top", "center center", "center bottom", "right top", "right center", and "right bottom". This parameter helps you control the positioning of text within the canvas, ensuring that it aligns with your artistic vision. The default value is "center center".
The padding
parameter specifies the amount of padding around the edges of the canvas in pixels. Padding creates space between the canvas border and the content, helping to frame your artwork and prevent elements from being too close to the edges. The default value is 0 pixels, and it can be adjusted in increments of 1 pixel, with a minimum value of 0 pixels.
The line_spacing
parameter determines the spacing between lines of text on the canvas. This parameter allows you to control the vertical distance between lines, ensuring that text elements are properly spaced and readable. The default value is 5 pixels, and it can be adjusted in increments of 1 pixel.
The images
parameter is optional and allows you to include images on the canvas. You can specify the images to be used, which can enhance your artwork by adding visual elements. The default value is None
, meaning no images are included unless specified.
The canvas
output parameter returns the configured canvas settings as a dictionary. This dictionary includes all the specified properties such as height, width, background color, text alignment, padding, line spacing, and any included images. The output is essential for subsequent nodes that will use these settings to render the final artwork, ensuring that all elements are placed and styled according to your specifications.
height
and width
parameters to match the dimensions required for your specific project, ensuring that your canvas size is appropriate for the intended output.background_color
parameter to set a base color that complements your artwork, creating a cohesive visual theme.text_alignment
options to find the best positioning for text elements, enhancing the overall composition of your canvas.padding
parameter to create space around the edges of your canvas, preventing elements from being too close to the borders and improving the overall layout.line_spacing
parameter to ensure that text elements are properly spaced and readable, enhancing the clarity and legibility of your artwork.© Copyright 2024 RunComfy. All Rights Reserved.