g | x | w | all
Bytes Lang Time Link
043C gcc250201T151936Zjdt
011Japt250129T151358ZShaggy
011Jelly250129T192433ZJonathan
01005AB1E250130T105101ZKevin Cr
140Google Sheets250129T131159Zdoubleun
017Uiua250129T153525Znoodle p
052APL+WIN250129T164919ZGraham
049JavaScript Node.js250129T122236Zl4m2
040Python250129T132349ZMukundan
019Charcoal250129T141033ZNeil
041Ruby250129T132014ZG B
039Uiua250129T124427Zmousetai

C (gcc), 43 bytes

f(x,y,c){x=x/3==c|(y/2==c)*2|(y/3==2-c)*4;}

Try it online!

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.

screenshot

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.

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

Try it online! Thanks to Dyalog Classic

JavaScript (Node.js), 49 bytes

(x,y,c)=>[x/3^c?'':1]+(y/2^c?'':2)+(y/3^2-c?'':3)

Try it online!

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]

Attempt This Online!

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.)

Ruby, 41 bytes

->x,y,c{1[x/3-c]*4+1[y/2-c]*2+1[2-y/3-c]}

Try it online!

Uiua, 39 chars

F ← ⨬(⊃⊃⋅>₅≤₂≥₃|∩↧⊃⊃⊃⋅⊃>₂<₆>₂<₄<₃|⊃⊃⋅<₃>₃0)

Pad Link