private void addDebugText(Canvas canvas, String label, String value, int valueColor) {
    final String labelColon = label + ": ";
    final float labelWidth = mPaint.measureText(labelColon);
    final float valueWidth = mPaint.measureText(value);

    final int margin = TEXT_LINE_SPACING_PX / 2;

    mPaint.setColor(TEXT_BACKGROUND_COLOR);
    canvas.drawRect(
        mCurrentTextXPx - margin,
        mCurrentTextYPx + TEXT_LINE_SPACING_PX,
        mCurrentTextXPx + labelWidth + valueWidth + margin,
        mCurrentTextYPx + mLineIncrementPx + TEXT_LINE_SPACING_PX,
        mPaint);

    mPaint.setColor(TEXT_COLOR);
    canvas.drawText(labelColon, mCurrentTextXPx, mCurrentTextYPx, mPaint);
    mPaint.setColor(valueColor);
    canvas.drawText(value, mCurrentTextXPx + labelWidth, mCurrentTextYPx, mPaint);

    mCurrentTextYPx += mLineIncrementPx;
  }
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