| Bytes | Lang | Time | Link |
|---|---|---|---|
| 043 | C gcc | 250201T151936Z | jdt |
| 011 | Japt | 250129T151358Z | Shaggy |
| 011 | Jelly | 250129T192433Z | Jonathan |
| 010 | 05AB1E | 250130T105101Z | Kevin Cr |
| 140 | Google Sheets | 250129T131159Z | doubleun |
| 017 | Uiua | 250129T153525Z | noodle p |
| 052 | APL+WIN | 250129T164919Z | Graham |
| 049 | JavaScript Node.js | 250129T122236Z | l4m2 |
| 040 | Python | 250129T132349Z | Mukundan |
| 019 | Charcoal | 250129T141033Z | Neil |
| 041 | Ruby | 250129T132014Z | G B |
| 039 | Uiua | 250129T124427Z | mousetai |
Japt, 15 12 11 bytes
Takes the 0-indexed coordinates [x y] as the first input, with y indexing from the bottom, and c as the second input. B, W & R and F, N & P are both represented by 0, 1 & 2, respectively.
Saved a byte thanks to Mukundan's suggestion of using the prime factors of 6 instead of the range [2,3].
ïz6k)ÅoÍð¶V
Try it (header & footer convert I/O between the formats used in the challenge)
ïz6k)ÅoÍð¶V :Implicit input of array U=[x,y] & integer V=c
ï :Cartesian product of U and
6k : Prime factors of 6 (i.e., [2,3])
z : Reducing each pair by floor division
) :End cartesian product
Å :Slice off first element (x//2)
o :Modify last element
Í : Subtract from 2
ð :0-based indices of elements
¶V : Equal to V
Jelly, 12 11 bytes
-1 byte thanks to lynn.
:Ɱ3ḊFḊạ0¦2=
A dyadic Link that accepts the location as a pair, [x, y], on the left, the colour, c, on the right, and yields a list of three presence bits in the order [N, F, P].
[0, 0] is the bottom-left and [8, 5] is the top-right.
Try it online!
Or see the test-suite.
Or see all-cases (flag-shaped bitmasks with N=4, F=2, P=1 for each of blue, white, and red).
How?
:Ɱ3ḊFḊạ0¦2= - Link: [x, y]; c
:Ɱ3 - {[x, y]} integer divide [1, 2, 3] -> [[x//1, y//1], [x//2, y//2], [x//3, y//3]]
Ḋ - dequeue {that} -> [[x//2, y//2], [x//3, y//3]]
F - flatten {that} -> [x//2, y//2, x//3, y//3]
Ḋ - dequeue {that} -> [y//2, x//3, y//3]
¦ - sparse application...
0 - ...to indices: zero (i.e. the rightmost)
ạ 2 - ...action: absolute difference with two (always equals 2-(y//3))
-> [y//2, x//3, 2-(y//3)]
= - {that} equals {c}? (vectorises)
-> [y//2==c, x//3==c, 2-(y//3)==c]
05AB1E, 11 10 bytes
ĆƵ„S÷`2α)Q
Two separated inputs: \$[y,x]\$ (where \$y=0\$ is the bottom row and \$y=5\$ is the top row) and \$c\$ (where 0=Blue; 1=White, 2=Red). Outputs a triplet of 0/1s representing if the color \$c\$ at position \$x,y\$ is present on the flag of \$[TheNetherlands, France, Poland]\$ respectively.
Try it online or verify all test cases or verify all possible inputs.
Explanation:
Ć # Append own head to the first (implicit) input-pair: [y,x,y]
Ƶ„ # Push compressed integer 233
S # Convert it to a list of digits: [2,3,3]
÷ # Integer-divide: [y//2,x//3,y//3]
` # Pop and push all three values separately to the stack
2α # Take the absolute different with 2 on the top: abs(y//3-2)
) # Wrap the three values on the stack back together:
# [y//2,x//3,abs(y//3-2)]
Q # Check for each whether it equals the second (implicit) input
# (after which this triplet is output implicitly as result)
See this 05AB1E tip of mine (section How to compress large integers?) to understand why Ƶ„ is 233.
Google Sheets, 140 bytes
=if(regexmatch(C1&A1,"B[012]|W[345]|R[678]"),"F",)&if(regexmatch(C1&B1,"R[01]|W[23]|B[45]"),"N",)&if(regexmatch(C1&B1,"W[012]|R[345]"),"P",)
Put the input in cells A1:C1 and the formula in cell D1.

Uiua, 17 bytes
=⌊[-⌊⤚÷2⊙+₁⤙˜∩÷₃]
Try it: Uiua pad
Outputs a boolean array [N P F], uses 0/1/2 for B/W/R. (0, 0) is the top left corner.
Explanation: We can get the color for each using one of the two coordinates.
- for the French flag, X divided by 3 gives 0/1/2 for B/W/R.
- for the Polish flag, Y divided by 3 plus 1 works.
- for the Netherlands flag, Y divided by 2 gives R/W/B, so subtract that from 2 to give the correct order.
We put these three values in an array, and check equality of each with the color input.
APL+WIN, 52 bytes
Prompts for y,x,colour. Index origin = 1. Top left [1;1]
⎕=((<\⎕≤3×⍳3)/⍳3),((<\y≤2×⍳3)/⌽⍳3),(<\(y←⎕)≤3 6)/2 3
JavaScript (Node.js), 49 bytes
(x,y,c)=>[x/3^c?'':1]+(y/2^c?'':2)+(y/3^2-c?'':3)
or 41 bitmask output by Unrelated String or 39 booleans by Weird Glyphs
Python, 40 bytes
lambda x,y,c:[x//3==c,y//2==c,y//3==2-c]
I/O
This function takes input as 0-indexed coordinates with \$(0, 0)\$ at the bottom-left corner and 0, 1, and 2 representing Blue, White, and Red, respectively. It returns an array of three boolean values, each indicating the presence of a country in the order of France, Netherlands, and Poland.
Explanation
The process for all three countries works in a similar way: divide the x or y coordinate, depending on the direction of the stripes, by the width of the stripes. This gives us an index of the stripe. After this, we compare the index with the color.
Charcoal, 19 bytes
NθI⌕A⟦÷N³÷θ²⁻²÷θ³⟧N
Try it online! Link is to verbose version of code. Takes inputs in the order y x c where y=0 is the bottom row and c is 0 for blue, 1 for white and 2 for red and outputs any of the three digits 0 for France, 1 for Holland and 2 for Poland. Explanation:
Nθ Input `y` as a number
N Input `x` as a number
÷ Integer divided by
³ Literal integer `3`
θ Input `y`
÷ Integer divided by
² Literal integer `2`
θ Input `y`
÷ Integer divided by
³ Literal integer `3`
⁻ Subtracted from
² Literal integer `2`
⟦ ⟧ Make into list
⌕A Find all indices of
N Input `c` as a number
I Cast to string
Implicitly print
I originally tried some creative cyclic indexing but that weighed in at a massive 35 bytes (it was originally over 40 bytes but I changed the output format from FNP to 012):
NθNηI⌕AE⟦⟦BWR⟧RRWWBB⭆WR׳ι⟧§§ιη÷θ³S
Try it online! Link is to verbose version of code. Takes inputs in the order x y c where y=0 is the top row and c is B, W or R as appropriate and outputs any of the three digits 0 for France, 1 for Holland and 2 for Poland. Explanation: Indexing a character does not change it, so for Holland and Poland once the row is indexed the column does not affect the result, while for France the string is wrapped in a list so the row does not affect the result. (Also the column is integer divided by 3 as that's golfier than repeating the characters.)