ComfyUI  >  Nodes  >  ComfyUI-Mana-Nodes >  🖼️ Canvas Properties

ComfyUI Node: 🖼️ Canvas Properties

Class Name

Canvas Properties

Category
💠 Mana Nodes/⚙️ Generator Settings
Author
ForeignGods (Account age: 1241 days)
Extension
ComfyUI-Mana-Nodes
Latest Updated
5/29/2024
Github Stars
0.2K

How to Install ComfyUI-Mana-Nodes

Install this extension via the ComfyUI Manager by searching for  ComfyUI-Mana-Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Mana-Nodes in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Cloud for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

🖼️ Canvas Properties Description

Configure canvas settings for AI-generated artwork: dimensions, background, text alignment, padding, line spacing.

🖼️ Canvas Properties:

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.

🖼️ Canvas Properties Input Parameters:

height

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.

width

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.

background_color

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".

text_alignment

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".

padding

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.

line_spacing

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.

images

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.

🖼️ Canvas Properties Output Parameters:

canvas

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.

🖼️ Canvas Properties Usage Tips:

  • Adjust the height and width parameters to match the dimensions required for your specific project, ensuring that your canvas size is appropriate for the intended output.
  • Use the background_color parameter to set a base color that complements your artwork, creating a cohesive visual theme.
  • Experiment with different text_alignment options to find the best positioning for text elements, enhancing the overall composition of your canvas.
  • Utilize the 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.
  • Adjust the line_spacing parameter to ensure that text elements are properly spaced and readable, enhancing the clarity and legibility of your artwork.

🖼️ Canvas Properties Common Errors and Solutions:

"Invalid height or width value"

  • Explanation: This error occurs when the specified height or width is not a valid integer.
  • Solution: Ensure that the height and width values are integers and within the acceptable range.

"Invalid background color"

  • Explanation: This error occurs when the specified background color is not a valid color name or code.
  • Solution: Verify that the background color is a valid string representing a color name or code.

"Invalid text alignment option"

  • Explanation: This error occurs when the specified text alignment option is not one of the allowed values.
  • Solution: Ensure that the text alignment value is one of the following: "left top", "left center", "left bottom", "center top", "center center", "center bottom", "right top", "right center", "right bottom".

"Padding value out of range"

  • Explanation: This error occurs when the specified padding value is less than the minimum allowed value of 0 pixels.
  • Solution: Ensure that the padding value is an integer greater than or equal to 0.

"Invalid line spacing value"

  • Explanation: This error occurs when the specified line spacing value is not a valid integer.
  • Solution: Verify that the line spacing value is an integer and within the acceptable range.

🖼️ Canvas Properties Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Mana-Nodes
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.