Page cover image

Colors & Textures

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.

ENDPOINT

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.

An API request must be in the form-data format.

Request

Parameters & Data Type
Value
Description

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. (Required Parameter)

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. (Required Parameter)

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. (Required Parameter)

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. (Required Parameter)

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. (Prompt or color or materials are required.)

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. (Prompt or color or materials are required.)

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. (Prompt or color or materials are required.)

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

How our Color and Texture API should work?

Here are some use cases of the Color and Texture modules API and how it will work.

Case 1: Changing Color Only

  • Payload Requirements: Only pass the color parameter.

  • Exclude: Do not pass materials, materials_type, and prompt.

Case 2: Changing Materials Only

  • Payload Requirements: Pass both materialsand materials_typeparameters.

  • Exclude: Do not pass color and prompt.

Case 3: Changing Materials with Specific Color

  • Payload Requirements: Pass color, materials, and materials_typeparameters.

  • Exclude: Do not pass prompt.

Custom Changes Using Prompt

If the desired color, materials, or materials_typeis not available in the app, and you want to change part of an image, you can use the prompt parameter to handle this.

Case 1: Custom Color Using Prompt

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

Case 2: Custom Materials and Materials_Type Using Prompt

  • Example Prompt: anthracite with white marble

Case 3: Custom Materials, Materials_Type, and Specific Color Using Prompt

  • Example Prompt: grey anthracite with white marble

Last updated

Was this helpful?