Colors & Textures
Last updated
Last updated
The "/change_color_textures" endpoint utilizes sophisticated AI algorithms to modify the colors and textures of structural components, decor items, and furniture pieces within any given image. This feature is particularly useful for interior designers, architects, and homeowners looking to visualize various aesthetic options before making final decisions. By providing an intuitive interface for color and texture customization, it empowers users to creatively explore and implement design modifications, enhancing the overall appearance and feel of their spaces.
POST
/change_color_textures
An API URL would be like https://homedesigns.ai/api/v2/change_color_textures
This element seamlessly alters the colours and textures of the structural elements, decor, and furniture in the images.
Here are some use cases of the Color and Texture modules API and how it will work.
Payload Requirements: Only pass the color
parameter.
Exclude: Do not pass materials
, materials_type
, and prompt
.
Payload Requirements: Pass both materials
and materials_type
parameters.
Exclude: Do not pass color
and prompt
.
Payload Requirements: Pass color
, materials
, and materials_type
parameters.
Exclude: Do not pass prompt
.
If the desired color
, materials
, or materials_type
is not available in the app, and you want to change part of an image, you can use the prompt
parameter to handle this.
Example Prompt: barbie pink
Note: Using such colors is not recommended, but you can use the paint visualizer feature if the image is of an interior type.
Example Prompt: anthracite with white marble
Example Prompt: grey anthracite with white marble
Error Messages | Reason |
---|---|
Error Messages | Reason |
---|---|
design_type
string
Interior, Exterior, Garden
Specifies the type of area you want to design. API users must specify whether they are designing an interior space, an exterior area, or a garden.
image
file[ .jpg, .jpeg, .png] / base64 Image string
-
The image to be processed by the API. The image dimensions must be 512x512 pixels or greater for optimal results.
masked_image
file[ .jpg, .jpeg, .png] / base64 Image string
-
The image to be processed by the API. The image dimensions must be 512x512 pixels or greater for optimal results. Click Here to generate a mask image Video Tutorial.
no_design
integer
Min - 1, Max - 4
Specifies the number of design variations you want the API to generate. The minimum is 1 and the maximum is 4.
prompt
null
or string
Custom Prompt
An optional parameter that allows users to provide a descriptive guide for the AI, helping it understand the specific design changes desired. This could include details like the item to be modified (e.g., 'black table') and its material composition (e.g., 'made out of hardwood'), enabling more accurate and tailored design generation.
color
null
or string
White, Off White, Cream, Ivory, Beige, Light Gray, Medium Gray, Charcoal Black, Taupe, Light Brown ..etc.
This parameter enables users to specify the color to be applied to the structural element, decor, or furniture in the image. Users can choose from a wide palette of colors, allowing for precise matching or the exploration of new color schemes to enhance the item's appearance in the design.
materials
null
or string
Fabrics, Glass, Wood, Stone, Metal, Ceramics and Porcelain, Plastics and Polymers, Paper and Cardboard, Natural Fibers, Composite Materials
This parameter allows users to select from a variety of materials to apply to the item being modified. Options include but are not limited to fabrics, glass, wood, and stone. Selecting a material helps the AI to accurately replicate the texture and look of the item as per the user's preference, ensuring a realistic modification.
materials_type
null
or string
Wallpaper, Cardboard, Kraft, Parchment, Foil embossed, Textured, Handmade paper, Recycled paper, Flocked paper, Metallic paper, Vellum, Linen paper, Watercolor paper, Matte, Glossy
A secondary parameter that provides further detail on the selected material. Depending on the primary material choice, this parameter allows users to specify the finish or texture, such as 'textured', 'foil embossed', 'handmade paper', 'recycled plastic', 'linen paper', or 'matte metallic'. This level of detail ensures that the modifications not only change the material but also accurately reflect its specific characteristics, adding depth and authenticity to the design
object
string
Required if prompt is Provided.
object names that are available in given image, [wall, floor, ceiling, etc.]
Image field required
Image not provided
Invalid image size. The image width and height must be 512x512 or greater than 512x512 pixels.
Image Size must be greater than 786X786.
Invalid image format. Only PNG, JPEG and JPG images are allowed.
Image Format not valid.
masked_image field required
masked_image not provided
Invalid image size. The image width and height must be 512x512 or greater than 512x512 pixels.
masked_image Size must be greater than 786X786.
Invalid image format. Only PNG, JPEG and JPG images are allowed.
masked_image Format not valid.
prompt field required (if color, materials, materials_type are not provided)
Either prompt or color, materials, and materials_type must be provided.
color field required (if prompt is not provided)
Either prompt or color, materials, and materials_type must be provided.
color value is not a valid enumeration member; permitted: White, Black, Grey, Blue, Red etc.
Color must be accurate from the provided suggesions.
materials field required (if prompt is not provided)
Either prompt or color, materials, and materials_type must be provided.
materials value is not a valid enumeration member; permitted: Fabrics, Glass, Wood, Stone, Metal, Ceramics and Porcelain, Plastics and Polymers, Paper and Cardboard, Natural Fibers, Composite Materials
materials must be accurate from the provided suggesions.
materials_type field required (if prompt is not provided)
color, materials, and materials_type are required. If you're not providing prompt.
materials_type should be in [Cotton, Linen, Silk, Velvet, Wool, Leather, Suede, Tweed, Chenille, Jacquard, Satin, Polyester, Nylon, Rayon, Cashmere]
materials_type must be accurate from the provided suggesions.
object field required
object not provided.