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

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

  • Makeup.set("makeup_texture.png") - sets an image-file as a makeup texture. The file should be placed into the effect's folder.
    • Supported formats: .jpeg, .jpg, .png, .ktx, .gif.
/* Feel free to add your custom code below */

Makeup.set("example_makeup.png")

Preview

Drag

Highlighting

Set highlighter color.

  • Makeup.highlighter("R G B A") - set highlighter color in R G B A format (separated with space). Each value should be in a range from 0 to 1 (including decimal).
/* Feel free to add your custom code below */

Makeup.highlighter("0.75 0.74 0.74 0.4")

Preview

Drag

Set a custom highlighter texture

  • Makeup.highlighter("highlighter.png") - sets an image-file as a highlighter texture. The file should be placed into the effect's folder.
    • Supported formats: .jpeg, .jpg, .png, .ktx, .gif.
/* Feel free to add your custom code below */

Makeup.highlighter("highlighter.png")

Contouring

Sets contour color.

  • Makeup.contour("R G B A") - set contour color in R G B A format (separated with space). Each value should be in a range from 0 to 1 (including decimal).
/* Feel free to add your custom code below */

Makeup.contour("0.3 0.1 0.1 0.6")

Preview

Drag

Set a custom contour texture

  • Makeup.contour("contour.png") - sets an image-file as a contour texture. The file should be placed into the effect's folder.
    • Supported formats: .jpeg, .jpg, .png, .ktx, .gif.
/* Feel free to add your custom code below */

Makeup.contour("contour.png")

Foundation

Foundation is a combination of two Beauty API features: Skin.color() and Skin.softening().

info

Requires Skin segmentation Neural Network.

/* Feel free to add your custom code below */

// set skin color
Skin.color("0.73 0.39 0.08 0.3")
// set softening strength (skin smoothing)
Skin.softening(1)

Preview

Drag

Blush

Set blush color.

  • Makeup.blushes("R G B A") - set blushes color in R G B A format (separated with space). Each value should be in a range from 0 to 1 (including decimal).
/* Feel free to add your custom code below */

Makeup.blushes("0.7 0.1 0.2 0.5")

Preview

Drag

Set a custom blush texture

  • Makeup.blushes("blushes.png") - sets an image-file as a blushes texture. The file should be placed into the effect's folder.
    • Supported formats: .jpeg, .jpg, .png, .ktx, .gif.
/* Feel free to add your custom code below */

Makeup.blushes("blush.png")

Softlight

Highlights a face like a directional flashlight.

  • Softlight.strength(n) - changes softlight intensity, where n - any value from 0 to 1 (including decimal). Values > 1 may be also provided.
  • Softlight.clear() - reset softlight, equals to Softlight.strength(0).
/* Feel free to add your custom code below */

Softlight.strength(1)
Softlight.clear()

Preview

Drag

Brows makeup

Set brows color.

  • Brows.color("R G B A") - set brows color in R G B A format (separated with space). Each value should be in a range from 0 to 1 (including decimal).
  • Brows.clear()- clears brows color.
/* Feel free to add your custom code below */

Brows.color("0.172 0.125 0.105 0.732")
Brows.clear()

Preview

Drag

Eye makeup

Eyeliner

Set eyeliner color.

  • Makeup.eyeliner("R G B A") - set eyeliner color in R G B A format (separated with space). Each value should be in a range from 0 to 1 (including decimal).
/* Feel free to add your custom code below */

Makeup.eyeliner("0 0 0")

Preview

Drag

Set a custom eyeliner texture

  • Makeup.eyeliner("eyeliner.png") - sets an image-file as an eyeliner texture. The file should be placed into the effect's folder.
    • Supported formats: .jpeg, .jpg, .png, .ktx, .gif.
/* Feel free to add your custom code below */

Makeup.eyeliner("eyeliner.png")

Eyeshadow

Set eyeshadow color.

  • Makeup.eyeshadow("R G B A") - set eyeshadow color in R G B A format (separated with space). Each value should be in a range from 0 to 1 (including decimal).
/* Feel free to add your custom code below */

Makeup.eyeshadow("0.6 0.5 1 0.6")

Preview

Drag

Set a custom eyeshadow texture

  • Makeup.eyeshadow("eyeshadow.png") - sets an image-file as an eyeshadow texture. The file should be placed into the effect's folder.
    • Supported formats: .jpeg, .jpg, .png, .ktx, .gif.
/* Feel free to add your custom code below */

Makeup.eyeshadow("eyeshadow.png")

Eyelashes

Set eyelashes color.

  • Makeup.lashes("R G B A") - set eyelashes color in R G B A format (separated with space). Each value should be in a rage from 0 to 1 (including decimal).
/* Feel free to add your custom code below */

Makeup.lashes("0 0 0")

Preview

Drag

Set a custom eyelashes texture

  • Makeup.lashes("eyelashes.png") - sets an image-file as an eyelashes texture. The file should be placed into the effect's folder.
    • Supported formats: .jpeg, .jpg, .png, .ktx, .gif.
/* Feel free to add your custom code below */

Makeup.lashes("eyelashes.png")

Makeup.clear

Global method for Makeup. Clears all Makeup features that have been set.

Makeup.clear()

Lipstick

Matt

Set lips matte color.

  • Lips.matt("R G B A") - set lips matte color in R G B A format (separated with space). Each value should be in a range from 0 to 1 (including decimal).
  • Lips.clear()- clears lips color.
/* Feel free to add your custom code below */

Lips.matt("0.85 0.43 0.5 0.8")
Lips.clear()

Preview

Drag

Shiny

Set lips shiny color.

  • Lips.shiny("R G B A") - set shiny lips color in R G B A format (separated with space). Each value should be in a range from 0 to 1 (including decimal).
  • Lips.clear()- clears lips color.
/* Feel free to add your custom code below */

Lips.shiny("1 0 0.49 1")
Lips.clear()

Preview

Drag

Glitter

Set lips glitter color.

  • Lips.glitter("R G B A") - set lips glitter color in R G B A format (separated with space). Each value should be in a range from 0 to 1 (including decimal).
  • Lips.clear()- clears lips color.
/* Feel free to add your custom code below */

Lips.glitter("0.552 0 0 1")
Lips.clear()

Preview

Drag

Extended lips options

It is possible to set up extended lips parameters which are usually pre-defined in Matte, Shiny or Glitter lips.

Common options

  • Lips.color("R G B A") - set lips color in R G B A format (separated with space). Each value should be in a range from 0 to 1 (including decimal).
  • Lips.brightness(n) - changes lips brightness intensity, where n - any value from 0 to 2 (including decimal). 0 stands for the minimal brightness (black color), 1 stands for standard brightness. Values > 2 may be also provided.

Shine options

  • Lips.saturation(n) - changes shine saturation intensity, where n - any value from 0 to 1 (including decimal).
  • Lips.shineIntensity(n) - changes shine intensity, where n - any value from 0 to 2 (including decimal). Values > 2 may be also provided.
  • Lips.shineBleeding(n) - changes shine blending strength, where n - any value from 0 to 1 (including decimal). Values > 1 may be also provided.
  • Lips.shineScale(n) - changes shine scale, where n - any value from 0 to 1 (including decimal). 0 stands for the minimal scale (shine disabled), 1 stands for standard scale. Values > 1 may be also provided.

Glitter options

  • Lips.glitterGrain(n) - changes glitter grain strength, where n - any value from 0 to 2 (including decimal). Values > 2 may be also provided.
  • Lips.glitterIntensity(n) - changes glitter intensity, where n - any value from 0 to 2 (including decimal). Values > 2 may be also provided.
  • Lips.glitterBleeding(n) - changes glitter blending strength, where n - any value from 0 to 2 (including decimal). Values > 2 may be also provided.
/* Feel free to add your custom code below */

Lips.color("1 0 0 1")
Lips.brightness(1)
Lips.saturation(1)
Lips.shineIntensity(2)
Lips.shineBleeding(1)
Lips.shineScale(1)
Lips.glitterGrain(1)
Lips.glitterIntensity(1)
Lips.glitterBleeding(1)