user: Show practical ways to work with Texture(ID) in a Blender add-on or script – include code.

assistant: # Texture(ID)

base classes — [`bpy_struct`](bpy.types.bpy_struct.html#bpy.types.bpy_struct "bpy.types.bpy_struct"), [`ID`](bpy.types.ID.html#bpy.types.ID "bpy.types.ID")

subclasses —
[`BlendTexture`](bpy.types.BlendTexture.html#bpy.types.BlendTexture "bpy.types.BlendTexture"), [`CloudsTexture`](bpy.types.CloudsTexture.html#bpy.types.CloudsTexture "bpy.types.CloudsTexture"), [`DistortedNoiseTexture`](bpy.types.DistortedNoiseTexture.html#bpy.types.DistortedNoiseTexture "bpy.types.DistortedNoiseTexture"), [`ImageTexture`](bpy.types.ImageTexture.html#bpy.types.ImageTexture "bpy.types.ImageTexture"), [`MagicTexture`](bpy.types.MagicTexture.html#bpy.types.MagicTexture "bpy.types.MagicTexture"), [`MarbleTexture`](bpy.types.MarbleTexture.html#bpy.types.MarbleTexture "bpy.types.MarbleTexture"), [`MusgraveTexture`](bpy.types.MusgraveTexture.html#bpy.types.MusgraveTexture "bpy.types.MusgraveTexture"), [`NoiseTexture`](bpy.types.NoiseTexture.html#bpy.types.NoiseTexture "bpy.types.NoiseTexture"), [`StucciTexture`](bpy.types.StucciTexture.html#bpy.types.StucciTexture "bpy.types.StucciTexture"), [`VoronoiTexture`](bpy.types.VoronoiTexture.html#bpy.types.VoronoiTexture "bpy.types.VoronoiTexture"), [`WoodTexture`](bpy.types.WoodTexture.html#bpy.types.WoodTexture "bpy.types.WoodTexture")

*class* bpy.types.Texture(*ID*)
:   Texture data-block used by materials, lights, worlds and brushes

    animation_data
    :   Animation data for this data-block

        Type:
        :   [`AnimData`](bpy.types.AnimData.html#bpy.types.AnimData "bpy.types.AnimData"), (readonly)

    color_ramp
    :   Type:
        :   [`ColorRamp`](bpy.types.ColorRamp.html#bpy.types.ColorRamp "bpy.types.ColorRamp"), (readonly)

    contrast
    :   Adjust the contrast of the texture

        Type:
        :   float in [0, 5], default 1.0

    factor_blue
    :   Type:
        :   float in [0, 2], default 1.0

    factor_green
    :   Type:
        :   float in [0, 2], default 1.0

    factor_red
    :   Type:
        :   float in [0, 2], default 1.0

    intensity
    :   Adjust the brightness of the texture

        Type:
        :   float in [0, 2], default 1.0

    node_tree
    :   Node tree for node-based textures

        Type:
        :   [`NodeTree`](bpy.types.NodeTree.html#bpy.types.NodeTree "bpy.types.NodeTree"), (readonly)

    saturation
    :   Adjust the saturation of colors in the texture

        Type:
        :   float in [0, 2], default 1.0

    type
    :   Type:
        :   enum in [Texture Type Items](bpy_types_enum_items/texture_type_items.html#rna-enum-texture-type-items), default `'IMAGE'`

    use_clamp
    :   Set negative texture RGB and intensity values to zero, for some uses like displacement this option can be disabled to get the full range

        Type:
        :   boolean, default False

    use_color_ramp
    :   Map the texture intensity to the color ramp. Note that the alpha value is used for image textures, enable “Calculate Alpha” for images without an alpha channel.

        Type:
        :   boolean, default False

    use_nodes
    :   Make this a node-based texture

        Type:
        :   boolean, default False

    use_preview_alpha
    :   Show Alpha in Preview Render

        Type:
        :   boolean, default False

    users_material
    :   Materials that use this texture

        Type:
        :   tuple of [`Material`](bpy.types.Material.html#bpy.types.Material "bpy.types.Material")

        (readonly)

    users_object_modifier
    :   Object modifiers that use this texture

        Type:
        :   tuple of [`Object`](bpy.types.Object.html#bpy.types.Object "bpy.types.Object")

        (readonly)

    evaluate(*value*)
    :   Evaluate the texture at the given coordinate and returns the result

        Parameters:
        :   **value** ([`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf]) – The coordinates (x,y,z) of the texture, in case of a 3D texture, the z value is the slice of the texture that is evaluated. For 2D textures such as images, the z value is ignored.

        Returns:
        :   The result of the texture where (x,y,z,w) are (red, green, blue, intensity). For grayscale textures, often intensity only will be used.

        Return type:
        :   [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 4 items in [-inf, inf]

    *classmethod* bl_rna_get_subclass(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The RNA type or default when not found.

        Return type:
        :   [`bpy.types.Struct`](bpy.types.Struct.html#bpy.types.Struct "bpy.types.Struct") subclass

    *classmethod* bl_rna_get_subclass_py(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The class or default when not found.

        Return type:
        :   [type](#bpy.types.Texture.type "bpy.types.Texture.type")