Possible? Set datum or somehow signal data on-chain

I have two values “red” and “blue” . I want to transparently be able to show people on chain that a script i’ve written is sometimes selecting red, sometimes selecting blue. I’m careful not to use the word Random since I don’t need it to be pure random. It’s ok if it use the transaction hash or current time etc to select Red or Blue. But I want it to be something I can share a transaction id to someone and show the selection.

In other words, I want to:

  1. Trigger a validator/script and have it somehow select red or blue (perhaps by looking at the last letter of the transaction id)
  2. then signal that on-chain somehow (perhaps by writing a datum or sending 2 ADA instead of 3 ADA to an address).

Is this even possible? I’m worried that if I have to predetermine the result when I create the transaction using cardano-cli, then it is no longer trustless. How can I show people that the Red or Blue result, on chain, in a trustless way? How would you go about this?

It’s almost as if I just need an “if” somewhere to have it create a data with “red” or with “blue” based on some other context number (ie transaction id last character). Is this possible in the off-chain code part of what we create in plutus playground? If I have to decide on “red” or “blue” when i build the tx using cardano-cli, then i am arbitrarily choosing it, and it’s completely non-random and not trustless at all.