# About colorized textures

**URL:** <https://forums.sketchup.com/t/about-colorized-textures/2381>\
**Category:** SketchUp SDK\
**Created:** [October 27, 2014, 10:08pm UTC](https://forums.sketchup.com/t/about-colorized-textures/2381 "2014-10-27T22:08:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![guruware](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@guruware](https://forums.sketchup.com/u/guruware)\
**Post date:** [October 27, 2014, 10:08pm UTC](https://forums.sketchup.com/t/about-colorized-textures/2381/1 "2014-10-27T22:08:57Z")

</div>

the sdk writes out colorized textures  
but i need the original texture and do the colorization myself

writing the un-clorized texture works  
but what is the secret behind the colorizing?  
i tried any blend-mode i can think of, and tinting  
it gives not the same result  
any hints ?

guruware

---

<div class="post-metadata">

**Author:** ![Aerilius](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@Aerilius](https://forums.sketchup.com/u/Aerilius)\
**Post date:** [October 27, 2014, 11:21pm UTC](https://forums.sketchup.com/t/about-colorized-textures/2381/2 "2014-10-27T23:21:16Z")

</div>

SketchUp’s Ruby API bakes non-affine (quadrilateral) texture transformations and color modifications into the exported images. This is because many file formats and external applications might not support these features the same way as SketchUp does. There is unfortunately not much control over this.

SketchUp supports two ways to adjust a material’s appearance, so-called _colorize types_:

- _Colorization_ will turn all pixels monochrome in one single color tone with only variations in brightness.

- _Color shifting_ will move the HSL values of each pixel (`[hue+ΔH, saturation+ΔS, light+ΔL]`), but preserves variations in color tone.

If your exporter is able to write out color information and complex texture transformations, you just want the original “Vanilla” image exported. The commonly used trick is

- for original colors: Reset the material by setting its color to `nil`. After exporting the texture, you have to `undo` to restore the modified color. (You can not save the modified color in a temporary variable and apply it again, because due to a bug SketchUp sets the colorize type to “colorized” even if it was “color shifted”.)

- for complete untransformed texture: Create a temporary empty group (which cannot have UV coordinates) and apply the material, then load it into the TextrueWriter and it will write the undistorted image.
