Gets an immutable {@linkplain GVRBitmapTexture texture} with the specified color,
returning a cached instance if possible.

@param color An Android {@link Color}.
@return And immutable instance of {@link GVRBitmapTexture}.
3789
public GVRBitmapTexture getSolidColorTexture(int color) {
        GVRBitmapTexture texture;
        synchronized (mColorTextureCache) {
            texture = mColorTextureCache.get(color);
            Log.d(TAG, "getSolidColorTexture(): have cached texture for 0x%08X: %b", color, texture != null);
            if (texture == null) {
                texture = new ImmutableBitmapTexture(mContext, makeSolidColorBitmap(color));
                Log.d(TAG, "getSolidColorTexture(): caching texture for 0x%08X", color);
                mColorTextureCache.put(color, texture);
                Log.d(TAG, "getSolidColorTexture(): succeeded caching for 0x%08X: %b",
                        color, mColorTextureCache.indexOfKey(color) >= 0);
            }
        }

        return texture;
    }
1216576
public static Bitmap retrieveThemeMapMarker(Context context) {
    TypedValue destinationMarkerResId = resolveAttributeFromId(context, R.attr.navigationViewDestinationMarker);
    int markerResId = destinationMarkerResId.resourceId;
    Drawable markerDrawable = ContextCompat.getDrawable(context, markerResId);
    return BitmapUtils.getBitmapFromDrawable(markerDrawable);
  }
537933
function ColorImage(color) {
  this.color = color;
  this.canvas = new Canvas(1, 1);
  this.ctx = this.canvas.getContext('2d');
  this.ctx.fillStyle = color.toString();
  this.ctx.fillRect(0, 0, 1, 1);
}
567976
public void setColor(int color) {
        setColor(Colors.byteToGl(Color.red(color)), //
                Colors.byteToGl(Color.green(color)), //
                Colors.byteToGl(Color.blue(color)));
    }
281130
public static Drawable getRippleDrawable(@ColorInt int normalColor, @ColorInt int pressedColor, int radius) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            return new RippleDrawable(ColorStateList.valueOf(pressedColor),
                    new ColorDrawable(normalColor), getRippleMask(normalColor, radius));
        } else {
            return getStateListDrawable(normalColor, pressedColor);
        }
    }
198785
public static Bitmap getBitmap(Drawable drawable) {
        if (drawable == null)
            return null;

        if (drawable instanceof BitmapDrawable) {
            return ((BitmapDrawable) drawable).getBitmap();
        } else {
            Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(),
                    drawable.getOpacity() != PixelFormat.OPAQUE ? Config.ARGB_8888 : Config.RGB_565);
            Canvas canvas = new Canvas(bitmap);
            drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
            drawable.draw(canvas);
            return bitmap;
        }
    }
101079
public static String toRGB(Color color) {
		if(color != null) {
			return "rgb(" + Integer.toString(color.getRed()) + "," + Integer.toString(color.getGreen()) + "," + Integer.toString(color.getBlue()) + ")"; 
		}
		return null;
	}
697619
public DesignSpec setKeylinesColor(int color) {
        if (mKeylinesPaint.getColor() == color) {
            return this;
        }

        mKeylinesPaint.setColor(color);
        invalidateSelf();

        return this;
    }
866023
@Override
	public MapColor getMapColor(Block block, IBlockState state, IBlockAccess world, BlockPos pos)
	{
		return MapColor.getBlockColor(state.getValue(getProperty()));
	}
346655
public static void checkColorRenderableTexture2D(
    final JCGLTextureFormat t)
    throws JCGLExceptionFormatError
  {
    if (!isColorRenderable2D(t)) {
      final String m = String.format(
        "Format %s is not color-renderable for 2D textures", t);
      assert m != null;
      throw new JCGLExceptionFormatError(m);
    }
  }
103116
public void setTextureColor(final Color TEXTURE_COLOR) {
        model.setTextureColor(TEXTURE_COLOR);
        BACKGROUND_FACTORY.recreatePunchedSheetTexture(TEXTURE_COLOR);
        reInitialize();
    }
1011363
public static BitmapDescriptor vectorToBitmap(@DrawableRes int drawableRes, @ColorRes int colorRes) {
		Drawable vectorDrawable = VectorDrawableCompat.create(AbstractApplication.get().getResources(), drawableRes, null);
		Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(), vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
		Canvas canvas = new Canvas(bitmap);
		vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
		DrawableCompat.setTint(vectorDrawable, AbstractApplication.get().getResources().getColor(colorRes));
		vectorDrawable.draw(canvas);
		return BitmapDescriptorFactory.fromBitmap(bitmap);
	}
466887
public DesignSpec setBaselineGridColor(int color) {
        if (mBaselineGridPaint.getColor() == color) {
            return this;
        }

        mBaselineGridPaint.setColor(color);
        invalidateSelf();

        return this;
    }
622642
public GVRTexture getSplashTexture(GVRContext gvrContext) {
        Bitmap bitmap = BitmapFactory.decodeResource( //
                gvrContext.getContext().getResources(), //
                R.drawable.__default_splash_screen__);
        GVRTexture tex = new GVRTexture(gvrContext);
        tex.setImage(new GVRBitmapImage(gvrContext, bitmap));
        return tex;
    }
1315177
public void setCustomPointerColor(final Color COLOR) {
        getModel().setCustomPointerColorObject(new CustomColorDef(COLOR));
        init(getInnerBounds().width, getInnerBounds().height);
        repaint(getInnerBounds());
    }
1181611
public void setTexture(String key, GVRTexture texture)
    {
        checkStringNotNullOrEmpty("key", key);
        synchronized (textures)
        {
            textures.put(key, texture);
            NativeShaderData.setTexture(getNative(), key, texture != null ? texture.getNative() : 0);
        }
    }
884610
public static int getDisplayColorFromColor(int color) {
        if (!isJellybeanOrLater()) {
            return color;
        }

        float[] hsv = new float[3];
        Color.colorToHSV(color, hsv);
        hsv[1] = Math.min(hsv[1] * SATURATION_ADJUST, 1.0f);
        hsv[2] = hsv[2] * INTENSITY_ADJUST;
        return Color.HSVToColor(hsv);
    }