Normal sudoku rules apply.
Additionally, the digits have colors:
3, 6, 9: red
1, 4, 7: yellow
2, 5, 8: blue
Two orthogonally adjacent numbers cannot have the same color.
The clues outside the grid, when present, specify the count of numbers of a specific color among the first X numbers seen from that direction, where X is the first number seen. Note that X itself is included in the count.
For example, if the first digit in a row is a 5, and the clue on the left shows a red 2, then the first 5 digits in that row contain two red digits.