[Android General] Grouxho:
Nop. Color for stock views is nothing to do with this mod. The tinting to apply is controlled inside every view in status bar, but is governed from DarkIconDispatcher class.

For example, in the stock clock class you can see that it implements this

.implements Lcom/android/systemui/statusbar/policy/DarkIconDispatcher$DarkReceiver;

If you have a look to that smali (or aosp extended or lineage source code) you will see that DarkReceiver declares an abstract method called

onDarkChanged(Landroid/graphics/Rect;FI)V

This means that Clock class has to implement that method. In onAttachedToWindow method in clock class you will see that clock register itself as a darkness receiver

invoke-interface {v0, p0}, Lcom/android/systemui/statusbar/policy/DarkIconDispatcher;->addDarkReceiver(Lcom/android/systemui/statusbar/policy/DarkIconDispatcher$DarkReceiver;)V

Since that moment Clock receives callbacks from DarkIconDispatcher on every transition from light backgrounds to dark backgrounds or viceverse.

If you have a look to onDarkChanged in clock,

.method public onDarkChanged(Landroid/graphics/Rect;FI)V
.locals 1

invoke-static {p1, p0, p3}, Lcom/android/systemui/statusbar/policy/DarkIconDispatcher;->getTint(Landroid/graphics/Rect;Landroid/view/View;I)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/policy/Clock;->setTextColor(I)V

return-void
.end method

So, in this case, clock colors are taken from DarkIconDispatcher. The implementation of Darkicondispatcher is in DarkIconDispatcherImpl If you go to DarkIconDispatcherImpl you will see what colors are taken

.field private mDarkModeIconColorSingleTone:I

.field private mIconTint:I

.field private mLightModeIconColorSingleTone:I

if you follow the code you will see the colors used for darkmode and light mode

For s7 the ids found in the class are these:

<public type="color" name="dark_mode_icon_color_single_tone" id="0x7f06005f" />
<public type="color" name="light_mode_icon_color_single_tone" id="0x7f0600e3" />

dark_mode_icon_color_single_tone is #99000000 (this is the color for light bgs) and light_mode_icon_color_single_tone is #bdffffff (this is the color for dark bgs)

The other var in darkdisplacher impl is mIconTint:I and it is the result of calculating a color between these 2 colors depending on the dark intensity of the background. If darkness is 0.0 (dark bgs) the resulting color is light_mode_icon_color_single_tone and if darkness is 1.0 (light bgs) the resulting color is dark_mode_icon_color_single_tone .

If you change these colors you will change the colors for most of the status bar views, as they are using DarkDispatcher in the same way clock do it (s system icons, etc. )

When you are in stock whatsapp, the status bar dark intensitiy value is 0.0. If you go now to tw messages app, the onDarchanged method in clock is called 3 or 4 times till the dark intensity is 1.0. Same but in the opposite way if you go from messages to whatsapp.

So, if you want to tint with your own colors by code the clock you have to mod onDarkChanged , knowing that in this case the F param is dark intensity and the I param is the icontint color.

It is quite easy. Remember that the F param correspond to dark intensity. if intensity is 0.0 you are in a dark status bar bg. If intensity is 1.0 you are in a light statusbar bg. You could easily to avoid intermediate values of dark intensity. Something like: "if intensity is 1.0 then set this text color, else set that other color".

Another way is to copy this method to clock

.method private getColorForDarkIntensity(FII)I
.locals 3

invoke-static {}, Landroid/animation/ArgbEvaluator;->getInstance()Landroid/animation/ArgbEvaluator;

move-result-object v0

invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

move-result-object v1

invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

move-result-object v2

invoke-virtual {v0, p1, v1, v2}, Landroid/animation/ArgbEvaluator;->evaluate(FLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

move-result-object v0

check-cast v0, Ljava/lang/Integer;

invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

move-result v0

return v0
.end method

You have to call it passing the dark bgs color you want, the light bgs color you want and the dark intensity. The result is an intermediate value between your 2 colors. So, form onDarkChanged take your custom colors for dark and light bgs, and call this method.. The result is the color you have to set.

I hope this helps.