Skip to main content

Virtual Makeup API

Banuba provides the Makeup API designed to help you integrate augmented reality beauty try on features into your app. The AR makeup features fit into e-commerce try on apps, makeovers, selfie editors and portrait retouching software. It aims to overlay realistic makeup onto the face to showcase the product or let users change their appearance.

Download example

tip

Read more about how to use and combine Makeup API and Face Beauty API features.

The Beauty module allows to enhance the face with the following built-in features:

Face makeup#

For features that allow to set custom texture:

note

To put textures under subfolder, e.g. custom_textures/makeup_1.png, specify this textures in cfg.toml inside no_preload_textures = [ ].

Makeup#

Sets texture as composite makeup (i.e. all-in-one: lashes, shadows, eyeliner, etc).

/* Feel free to add your custom code below */
// set texture as makeup
Makeup.set("example_makeup.png")
// reset makeup
Makeup.clear()

Preview

Drag

Highlighting#

/* Feel free to add your custom code below */
// set highlighter color
Highlighter.color("0.75 0.74 0.74 0.4")
// reset highlighter color
Highlighter.clear()

Preview

Drag

Set a custom highlighter texture

/* Feel free to add your custom code below */
// set a custom highlighter texture
Highlighter.set("highlighter.png")

Contouring#

/* Feel free to add your custom code below */
// set contour color
Contour.color("0.3 0.1 0.1 0.6")
// reset contour color
Contour.clear()

Preview

Drag

A custom Contour texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

/* Feel free to add your custom code below */
// set a custom contour texture
Contour.set("contour.png")

Foundation#

info

Requires Skin segmentation Neural Network.

/* Feel free to add your custom code below */
// set foundation color
Foundation.color("0.73 0.39 0.08 0.3")
// set foundation strength (skin smoothing)
Foundation.strength("1")
// reset foundation strength and color
Foundation.clear()

Preview

Drag

Blush#

/* Feel free to add your custom code below */
// set blush color
Blush.color("0.7 0.1 0.2 0.5")
// reset blush color
Blush.clear()

Preview

Drag

A custom Blush texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

/* Feel free to add your custom code below */
// set a custom blush texture
Blush.set("blush.png")

Softlight#

Highlights a face like a directional flashlight.

/* Feel free to add your custom code below */
// Sets softlight strength from 0 to 1
Softlight.strength("1")

Preview

Drag

Eye makeup#

For features that allow to set custom texture:

note

To put textures under subfolder, e.g. custom_textures/makeup_1.png, specify this textures in cfg.toml inside no_preload_textures = [ ].

Eyeliner#

/* Feel free to add your custom code below */
// set eyeliner color
Eyeliner.color("0 0 0")
// reset eyeliner color
Eyeliner.clear()

Preview

Drag

A custom Eyeliner texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

/* Feel free to add your custom code below */
// set a custom eyeliner texture
Eyeliner.set("eyeliner.png")

Eyeshadow#

/* Feel free to add your custom code below */
// set eyeshadow color
Eyeshadow.color("0.6 0.5 1 0.6")
// reset eyeshadow color
Eyeshadow.clear()

Preview

Drag

A custom Eyeshadow texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

/* Feel free to add your custom code below */
Eyeshadow.set("eyeshadow.png")

Eyelashes#

/* Feel free to add your custom code below */
// set eyelashes color
Eyelashes.color("0 0 0")
// reset eyelashes color
Eyelashes.clear()

Preview

Drag

A custom Eyelashes texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

/* Feel free to add your custom code below */
// set a custom eyelashes texture
Eyelashes.set("eyelashes.png")

Eyebrows (Coming soon...)#

Lipstick#

Matt#

/* Feel free to add your custom code below */
// set lips matt color
Lips.matt("0.85 0.43 0.5 0.8")
// resets lips color
Lips.clear()

Preview

Drag

Shiny#

/* Feel free to add your custom code below */
// set lips shiny color
Lips.shiny("1 0 0.49 1")
// resets lips color
Lips.clear()

Preview

Drag

Glitter#

/* Feel free to add your custom code below */
// set lips glitter color
Lips.glitter("0.552 0 0 1")
// resets glitter color
Lips.clear()

Preview

Drag
Last updated on