@Override
  public void draw(Canvas canvas) {
    Rect bounds = getBounds();

    // Draw bounding box
    mPaint.setStyle(Paint.Style.STROKE);
    mPaint.setStrokeWidth(OUTLINE_STROKE_WIDTH_PX);
    mPaint.setColor(OUTLINE_COLOR);
    canvas.drawRect(bounds.left, bounds.top, bounds.right, bounds.bottom, mPaint);

    // Draw overlay
    mPaint.setStyle(Paint.Style.FILL);
    mPaint.setColor(mOverlayColor);
    canvas.drawRect(bounds.left, bounds.top, bounds.right, bounds.bottom, mPaint);

    // Draw text
    mPaint.setStyle(Paint.Style.FILL);
    mPaint.setStrokeWidth(0);
    mPaint.setColor(TEXT_COLOR);
    // Reset the test position
    mCurrentTextXPx = mStartTextXPx;
    mCurrentTextYPx = mStartTextYPx;

    if (mImageId != null) {
      addDebugText(canvas, "IDs", format("%s, %s", mControllerId, mImageId));
    } else {
      addDebugText(canvas, "ID", mControllerId);
    }
    addDebugText(canvas, "D", format("%dx%d", bounds.width(), bounds.height()));
    if (bounds.height() > 0) {
      addDebugText(canvas, "DAR", bounds.width() / (float) bounds.height());
    }

    // use text color to indicate dimension differences
    final int sizeColor = determineSizeHintColor(mWidthPx, mHeightPx, mScaleType);
    addDebugText(canvas, "I", format("%dx%d", mWidthPx, mHeightPx), sizeColor);
    if (mHeightPx > 0) {
      addDebugText(canvas, "IAR", mWidthPx / (float) mHeightPx);
    }

    addDebugText(canvas, "I", format("%d KiB", (mImageSizeBytes / 1024)));
    if (mImageFormat != null) {
      addDebugText(canvas, "i format", mImageFormat);
    }
    if (mFrameCount > 0) {
      addDebugText(canvas, "anim", format("f %d, l %d", mFrameCount, mLoopCount));
    }
    if (mScaleType != null) {
      addDebugText(canvas, "scale", mScaleType);
    }
    if (mFinalImageTimeMs >= 0) {
      addDebugText(canvas, "t", format("%d ms", mFinalImageTimeMs));
    }
    if (mOriginText != null) {
      addDebugText(canvas, "origin", mOriginText, mOriginColor);
    }
    for (Map.Entry<String, String> entry : mAdditionalData.entrySet()) {
      addDebugText(canvas, entry.getKey(), entry.getValue());
    }
  }
Pass a semi-transparency color (e.g., 0x66RRGGBB) to give the overlay a color shade.
drawee/src/main/java/com/facebook/drawee/debug/DebugControllerOverlayDrawable.java